home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
prodpack.zip
/
DB4PPSRC.EXE
/
_FILEDRV.PRG
< prev
next >
Wrap
Text File
|
1993-05-04
|
1KB
|
39 lines
FUNCTION _FileDrv
PARAMETER pc_fname
*--------------------------------------------------------------------
* NAME
* _FILEDRV - returns the drive letter from a DOS filename
*
* SYNOPSIS
* _FILEDRV( pc_fname )
*
* DESCRIPTION
* _FILEDRV() determines the drive letter, if any,
* contained in the file specification pc_fname
* and returns just the drive letter.
*
* No upper or lower case conversion is performed.
* If the filespec contains no drive letter, a
* null string ("") will be returned.
*
* PARAMETER
* pc_fname - A character DOS filespec
*
* EXAMPLES
* lc_drive = _FileDrv( "C:\TEST\FOO.PRG" )
* ( lc_drive will equal "C" )
*
* lc_drive = FileDrv( "FOO.PRG" )
* ( lc_drive will equal "" )
*
* SEE ALSO
* _FILEPATH(), _FILEROOT(), _FILETYPE()
*
*--------------------------------------------------------------------
RETURN( IIF( AT( ":", pc_fname ) = 2, ;
LEFT( pc_fname, 1 ), "" ) )
*-- EOF: _FileDrv( pc_fname )